package org.hospital.entity;
// default package

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hospital.util.DateUtil;


/**
 * Client entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="client"
    ,catalog="hospital"
)

public class Client  implements java.io.Serializable {


    // Fields    
     private Integer clientId;
     private String name;
     private String identity;
     private Integer sex = -1;
     private String phone = "null";
     private Timestamp birthdate = new Timestamp(DateUtil.getDateLong("1000-01-01 00:00:00"));
     private String nation = "null";
     private Integer marriage = -1;
     private String occupation = "null";
     private Timestamp registerTime;
     private Integer status;


    // Constructors

    /** default constructor */
    public Client() {
    }

	/** minimal constructor */
    public Client(String name, Timestamp registerTime, Integer status) {
        this.name = name;
        this.registerTime = registerTime;
        this.status = status;
    }
    
    /** full constructor */
    public Client(String name, String identity, Integer sex, String phone, Timestamp birthdate, String nation, Integer marriage, String occupation, Timestamp registerTime, Integer status) {
        this.name = name;
        this.identity = identity;
        this.sex = sex;
        this.phone = phone;
        this.birthdate = birthdate;
        this.nation = nation;
        this.marriage = marriage;
        this.occupation = occupation;
        this.registerTime = registerTime;
        this.status = status;
    }

   
    // Property accessors
    @Id @GeneratedValue
    
    @Column(name="clientId", unique=true, nullable=false)
    public Integer getClientId() {
        return this.clientId;
    }
    
    public void setClientId(Integer clientId) {
        this.clientId = clientId;
    }
    
    @Column(name="name", nullable=false, length=50)
    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    @Column(name="identity", length=18)
    public String getIdentity() {
        return this.identity;
    }
    
    public void setIdentity(String identity) {
        this.identity = identity;
    }
    
    @Column(name="sex")
    public Integer getSex() {
        return this.sex;
    }
    
    public void setSex(Integer sex) {
        this.sex = sex;
    }
    
    @Column(name="phone", length=20)
    public String getPhone() {
        return this.phone;
    }
    
    public void setPhone(String phone) {
        this.phone = phone;
    }
    
    @Column(name="birthdate", length=19)
    public Timestamp getBirthdate() {
        return this.birthdate;
    }
    
    public void setBirthdate(Timestamp birthdate) {
        this.birthdate = birthdate;
    }
    
    @Column(name="nation", length=50)
    public String getNation() {
        return this.nation;
    }
    
    public void setNation(String nation) {
        this.nation = nation;
    }
    
    @Column(name="marriage")
    public Integer getMarriage() {
        return this.marriage;
    }
    
    public void setMarriage(Integer marriage) {
        this.marriage = marriage;
    }
    
    @Column(name="occupation", length=50)

    public String getOccupation() {
        return this.occupation;
    }
    
    public void setOccupation(String occupation) {
        this.occupation = occupation;
    }
    
    @Column(name="registerTime", nullable=false, length=19)
    public Timestamp getRegisterTime() {
        return this.registerTime;
    }
    
    public void setRegisterTime(Timestamp registerTime) {
        this.registerTime = registerTime;
    }
    
    @Column(name="status", nullable=false)
    public Integer getStatus() {
        return this.status;
    }
    
    public void setStatus(Integer status) {
        this.status = status;
    }
   








}